package com.freshman_registration.service;


import com.freshman_registration.pojo.Students;
import com.freshman_registration.util.Result;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import jakarta.servlet.http.HttpServletResponse;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface StudentService {
    Result<Students> queryStudentByStudentId(String studentId);//根据学号查询学生信息
    Result<?> insertStudent(Students student);//添加学生信息
    Result<?> updateStudent(Students student);//修改学生信息
    Result<?> deleteStudent(Integer id);//删除学生信息
    Page queryAllStudents(Integer currentPage, Integer pageSize);//分页查询所有学生信息

  //学生登录
    Result<Map<String,Object>> loginWithDorm(String studentId, String password);

    //excel文件导出
    void exportExcel(HttpServletResponse response);

    //excel文件导入
    void importTemplate(HttpServletResponse response) throws IOException;
//根据学号修改信息
    Result<?> updateStudentByStudentId(Students student);

    //根据状态姓名学号名分页
    PageInfo<Students> queryStudents(
            Integer accountStatus, String studentId, String name,
            Integer currentPage, Integer pageSize);

    //批量删除
    Result<?> deleteBatchStudent(List<Integer> ids);
    //状态更新
    Result<Integer> updateStatusStudent(@Param("id") Integer id,
                                 @Param("accountStatus") String accountStatus
    );
    //修改密码
    Result<?> updatePassword(@Param("studentId")String studentId,@Param("password") String password);


    //更改头像
    Result<?> updatePhoto(@Param("studentId") String  studentId, @Param("photo") String photo);
}
